<template>
	<view class="goods-intro">
		<view class="goods-intro-title">
			<image :src="item.goodsimg" mode=""></image>
			<text class="goods-name">{{ item.goodsname }}</text>
		</view>
		<view class="goods-intro-bottom">
			<text>&yen;<text class="goods-price">{{ item.goodsbaseprice.toFixed(2) }}</text></text>
			<text class="merchant-name">{{ item.merchantsname }}</text>
		</view>
	</view>
</template>

<script>
	export default {
		name:"index-good",
		props: {
			item: {
				type: Object,
				required: true
			}
		},
		data() {
			return {
				
			};
		}
	}
</script>

<style>
	.goods-intro-title,
	.goods-intro-bottom {
		display: flex;
		flex-direction: column;
		justify-content: space-around;
		align-items: flex-start;
		padding: 0 10rpx;
	}
	
	.goods-name,
	.goods-intro-bottom > text {
		margin-top: 10rpx;
	}
	
	.goods-name {
		overflow: hidden;
		color: #434343;
		text-overflow: ellipsis;
		display: -webkit-box;
		-webkit-line-clamp: 2;
		word-break: break-all;
		-webkit-box-orient: vertical;
		font-size: 13px;
	}
	
	.goods-price {
		color: red;
		font-size: 20px;
		margin-left: 5rpx;
	}
	
	.goods-intro-title image {
		width: 325rpx;
		height: 325rpx;
		align-self: center;
	}
	
	.merchant-name {
		font-size: 12px;
		color: #343434;
	}
</style>